<php>
	$this->display(tpl('head',true));
	$reg_is_open[$data['reg_is_open']]="checked";
	$reg_is_yzm[$data['reg_is_yzm']]="checked";
	$reg_is_code[$data['reg_is_code']]="checked";
	$reg_is_email_repeat[$data['reg_is_email_repeat']]="checked";
	$reg_user_state[$data['reg_user_state']]="checked";
	$reg_is_mobile_repeat[$data['reg_is_mobile_repeat']]="checked";
</php>
<style>
	.layui-form-label {
	    float: left;
	    display: block;
	    padding: 9px 15px;
	    width: 10%;
	    font-weight: 400;
	    text-align: right;
	}
	p{
		margin-top: 10px;
	}
	.layui-form-select {
	    width: 30%;
	}
</style>
	<fieldset class="layui-elem-field layui-field-title">
	  	<legend>会员注册设置</legend>
	</fieldset>
	<form class="layui-form" method="post">
		<table class="layui-table" >
			<tr>
				<td>是否开放注册</td>
				<td>
					<input name="web[reg_is_open]" value="1" 	type="radio" title="禁止注册" {{$reg_is_open['1'] }}>
			    	<input name="web[reg_is_open]" value="0" 	type="radio" title="开放注册" {{$reg_is_open['0'] }}>
				</td>
			</tr>
			<tr>
				<td>关闭注册原因</td>
				<td>
					<textarea name="web[reg_close_why]" class="layui-textarea my-input" >{{$data['reg_close_why'] }}</textarea>
			</tr>
			<tr>
				<td>不允许使用的会员名</td>
				<td>
					<input name="web[not_use_username]"  value="{{$data['not_use_username'] }}" type="text" class="layui-input my-input">
					<p>比如admin 不管前后，凡是带有admin的都不允许,多个请用空格隔开</p>
				</td>
			</tr>
			<tr>
				<td>注册时间间隔</td>
				<td>
					<input name="web[reg_interval_time]"  value="{{$data['reg_interval_time'] }}" type="number" class="layui-input my-input">
					<p>0或者为空则不限制，单位分钟，要大于此时间才可重新注册</p>
				</td>
			</tr>
			<tr>
				<td>注册是否使用验证码</td>
				<td>
					<input name="web[reg_is_yzm]" value="1" 	type="radio" title="使用" {{$reg_is_yzm['1'] }}>
			    	<input name="web[reg_is_yzm]" value="0" 	type="radio" title="停用" {{$reg_is_yzm['0'] }}>
				</td>
			</tr>
			<tr>
				<td>是否使用注册码才能注册</td>
				<td>
					<input name="web[reg_is_code]" value="0" 	type="radio" title="停用" {{$reg_is_code['0'] }}>
			    	<input name="web[reg_is_code]" value="1" 	type="radio" title="使用邮箱" {{$reg_is_code['1'] }}>
					<if condition="$is_sms">
			    	<input name="web[reg_is_code]" value="2" 	type="radio" title="使用手机" {{$reg_is_code['2'] }}>
			    	<if>
			    	<p>如果使用邮箱或者手机获取注册码，可以将上面的验证码关闭</p>
				</td>
			</tr>
			<tr>
				<td>停用上面的注册码会员状态为</td>
				<td>
					<input name="web[reg_user_state]" value="0" 	type="radio" title="人工审核" {{$reg_user_state['0'] }}>
			    	<input name="web[reg_user_state]" value="1" 	type="radio" title="直接审核" {{$reg_user_state['1'] }}>
				</td>
			</tr>
			<tr>
				<td>是否同邮箱注册多个账号</td>
				<td>
					<input name="web[reg_is_email_repeat]" value="0" 	type="radio" title="允许" {{$reg_is_email_repeat['0'] }}>
			    	<input name="web[reg_is_email_repeat]" value="1" 	type="radio" title="不允许" {{$reg_is_email_repeat['1'] }}>
				</td>
			</tr>
			<tr>
				<td>是否同手机注册多个账号</td>
				<td>
					<input name="web[reg_is_mobile_repeat]" value="0" 	type="radio" title="允许" {{$reg_is_mobile_repeat['0'] }}>
			    	<input name="web[reg_is_mobile_repeat]" value="1" 	type="radio" title="不允许" {{$reg_is_mobile_repeat['1'] }}>
				</td>
			</tr>
			<tr>
				<td>手机验证码显示个数</td>
				<td>
					<input class="layui-input my-input" name="web[mobile_yzm_num]" value="{{$data['mobile_yzm_num'] }}" type="number"  >
			    	<p>想显示几位数就填写几，最好别大于6,默认为4</p>
				</td>
			</tr>
			<tr>
				<td>手机验证码发送间隔</td>
				<td>
					<input class="layui-input my-input" name="web[mobile_put_time]" value="{{$data['mobile_put_time'] }}" type="number"  >秒
			    	<p>同一号码发送验证码的间隔时间，间隔为妙。默认为60秒</p>
				</td>
			</tr>
			<tr>
				<td>手机验证码有效时间</td>
				<td>
					<input class="layui-input my-input" name="web[mobile_useful_time]" value="{{$data['mobile_useful_time'] }}" type="number"  >分钟
			    	<p>手机验证码的有效期。默认为5分钟</p>
				</td>
			</tr>
			<tr>
				<td>用户注册后所属会员组</td>
				<td>
					<select name="web[reg_groupid]">
						<option  value="">请选择一个会员组</option>
						<foreach array="C('USER_GROUP')" f="1" key="gid">
						<php>
							$selected=$gid == $data['reg_groupid'] ? $selected='selected' : "";
						</php> 
						<option {{$selected }}  value="{{$gid }}">{{$row['name'] }}</option>
						</foreach>
					</select>
				</td>
			</tr>
		</table>
		<table class="layui-table" >
			<tr>
				<td>
					<div class="my_button">
						<input type="hidden" name="step" id="step" value="post" />
						<button class="layui-btn">立即设置</button>
					</div>
				</td>
			</tr>
		</table>
	</form>
<script>

layui.config({
	version: '{{NOWTIME }}'
});
layui.use(['form'], function(){
  	var $ = layui.jquery
	var form = layui.form;
});
	  
</script>
<php>
	$this->display(tpl('foot',true));
</php>